package com.wsz.user.mapper;

import com.wsz.pojo.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wsz.pojo.dto.UserDto;
import com.wsz.user.config.RedisCache;
import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.parameters.P;

import java.util.List;

/**
* @author wangs
* @description 针对表【user】的数据库操作Mapper
* @createDate 2023-01-19 13:58:58
* @Entity com.wsz.pojo.User
*/
@Mapper
@CacheNamespace(implementation= RedisCache.class,eviction= RedisCache.class)
public interface UserMapper extends BaseMapper<User> {
    void updatePasswordByUsername(@Param("username") String username,@Param("password") String password);

    List<UserDto> getUserList(@Param("page") Long page, @Param("limit") Long limit);

    void updateEnabledByUserId(@Param("userId") String userId,@Param("enabled") boolean enabled);

    Integer getRegisterCount(@Param("date") String date);

}




